package cn.jsj.invite.pojo;

import io.micrometer.core.instrument.util.StringUtils;

public enum PictureFileTypeEnum {

    GIF,

    JPG,

    JPEG,

    PNG;

    public static Boolean isEnableFileNameSuffix(String fileNameSuffix) {
        if (StringUtils.isBlank(fileNameSuffix)) {
            return false;
        }
        fileNameSuffix = fileNameSuffix.toUpperCase();
        try {
            PictureFileTypeEnum.valueOf(fileNameSuffix);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }

}
